﻿using System;
using System.Windows.Forms;

namespace NmbpProject2.PresentationLayer
{
    public partial class MainForm : Form
    {
        

        public MainForm()
        {
           InitializeComponent();
        }

        private void buttonApplications_Click(object sender, EventArgs e)
        {
            CompApplicationForm compApplicationForm = new CompApplicationForm();
            compApplicationForm.ShowDialog();
        }

        private void buttonCompetitions_Click(object sender, EventArgs e)
        {
            CompetitionForm competitionForm = new CompetitionForm();
            competitionForm.ShowDialog();
        }

        private void buttonCategories_Click(object sender, EventArgs e)
        {
            CategoryForm categoriesForm = new CategoryForm();
            categoriesForm.ShowDialog();
        }

        private void buttonPeople_Click(object sender, EventArgs e)
        {
            PeopleForm peopleForm = new PeopleForm();
            peopleForm.ShowDialog();
        }

        private void buttonProgLanguages_Click(object sender, EventArgs e)
        {
            LanguagesForm languagesForm = new LanguagesForm();
            languagesForm.ShowDialog();
        }

        private void buttonExit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void rbDb4o_CheckedChanged(object sender, EventArgs e)
        {
            if (rbDb4o.Checked) DbConfig.DBTYPE = dbtype.Db40;

        }

        private void rbOracle_CheckedChanged(object sender, EventArgs e)
        {
            if (rbOracle.Checked) DbConfig.DBTYPE = dbtype.Oracle;

        }

    }

   }